At the operating system level, a known mechanism for protecting data and functionality is to define a user space and a kernel space. Within the kernel space, privileged kernel and many device drivers are executed. In contrast, application software and some device drivers execute in the user space. In some systems, a user space function performs a system call to perform a certain action inside the kernel (e.g., in kernel space). After that action has been completed, the kernel returns control back to the calling user space function.
Signal handlers process asynchronous notifications or other signals that arise due to the occurrence of events, and this happens asynchronous to user space as well. However, with signal handlers, the kernel is not able to execute a user space function in user space at a point in time that the kernel determines is appropriate for its own control flow.